package com.nwcl.ysx.request;

import com.nwcl.common.request.BaseRequest;
import com.nwcl.common.result.Result;
import org.apache.commons.lang3.StringUtils;


public class YsxLoginRequest implements BaseRequest {
    private String encryptedData;
    private String iv;
    private String code;

    @Override
    public Result check() {
        if (StringUtils.isBlank(this.getEncryptedData())) {
            return Result.fail("加密数据不能为空");
        }
        if (StringUtils.isBlank(this.getIv())) {
            return Result.fail("加密算法的初始向量不能为空");
        }
        if (StringUtils.isBlank(this.getCode())) {
            return Result.fail("回调code不能为空");
        }
        return null;
    }

    public String getEncryptedData() {
        return encryptedData;
    }

    public void setEncryptedData(String encryptedData) {
        this.encryptedData = encryptedData;
    }

    public String getIv() {
        return iv;
    }

    public void setIv(String iv) {
        this.iv = iv;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
